package net.cohoivang.core;

import java.util.LinkedList;
import java.util.List;

import net.cohoivang.news.News;

public class Industry {
	final int industryId;
	String industryName;
	Sector sector;
		
	List<Company> allCompany = new LinkedList<Company>();
	
			
	public String getIndustryName() {
		return industryName;
	}
	
	public Sector getSector() {
		return sector;
	}

	
	public List<Company> getAllCompany() {
		return allCompany;
	}	

	public int getIndustryId() {
		return industryId;
	}

	public Industry(int industryId, String industryName, Sector sector) {
		this.industryId = industryId;
		this.industryName = industryName;
		this.sector = sector;
	}
	
	public Company createCompany(String legalName, String englishName) {		
		Company company = new Company(legalName, englishName);
		company.industry = this;
		company.sector = sector;
		allCompany.add(company);
		return company;
	}
	
	public void insertCompany(Company company){
		allCompany.add(company);
	}
		
}
